home *** CD-ROM | disk | FTP | other *** search
/ Workplace Effectiveness: Critical Thinking Skills / Workplace Effectiveness: Critical Thinking Skills.iso / pc / Files / Rewind.dxr / 00023_personal resources code.ls < prev    next >
Encoding:
Text File  |  1998-09-14  |  1014 b   |  35 lines

  1. global gMachineData
  2.  
  3. on setSliderLoc
  4.   updateStage()
  5. end
  6.  
  7. on moveSlider thisSprite
  8.   set vMinHz to 404
  9.   set vMaxHz to 568
  10.   set vVertPos to the locV of sprite thisSprite
  11.   puppetSprite(thisSprite, 1)
  12.   set vNewLocH to vMinHz
  13.   repeat while the mouseDown
  14.     set vPlotLoc to the mouseH
  15.     case 1 of
  16.       (vPlotLoc < vMinHz):
  17.         set the loc of sprite thisSprite to point(vMinHz, vVertPos)
  18.         set vNewLocH to vMinHz
  19.       (vPlotLoc > vMaxHz):
  20.         set the loc of sprite thisSprite to point(vMaxHz, vVertPos)
  21.         set vNewLocH to vMaxHz
  22.       otherwise:
  23.         set the loc of sprite thisSprite to point(the mouseH, vVertPos)
  24.         set vNewLocH to vPlotLoc
  25.     end case
  26.     updateStage()
  27.   end repeat
  28.   puppetSound("quickclick")
  29.   set vDivDistance to 164.0 / 9
  30.   set vDivNumber to integer(1.0 * (vNewLocH - 404) / vDivDistance)
  31.   set snapPointH to integer(vDivNumber * vDivDistance) + 404
  32.   set the loc of sprite thisSprite to point(snapPointH, vVertPos)
  33.   scoreSlider(thisSprite, vDivNumber)
  34. end
  35.